|
|
|
|
|
|
|
Figure 3.16.
Using the Application Wizard to create the Explorer
interface. |
|
|
|
|
|
|
|
|
Select the Explorer style as the application type; then accept the defaults on the remaining wizard dialog boxes. This will create more the overall interface for you, including toolbars and menus. Of course, you still need to add the actual application code to this shell. Execute the application and see how the two displayed areas can be resized by simply dragging the bar between them. To add a couple of sample documents to the application, add the code in Listing 3.1 to the form and then add the following line of code to the Form_Load routine: |
|
|
|
|
|
|
|
|
LISTING 3.1. ADD_DOCUMENT.TXTADDING NODES TO THE TREEVIEW CONTROL AND OPENING A TEXT FILE FOR DISPLAY. |
|
|
|
 |
|
|
|
|
1: Public Sub Add_Document()
2: Dim MyNode As Node
3: Clean out the TreeView control
4: tvTreeView.Nodes.Clear
5:
6: Set the Document Type
7: Set MyNode = tvTreeView.Nodes.Add(, , A, Explorer)
8:
9: Set the Documents
10: Set MyNode = tvTreeView.Nodes.Add(A, tvwChild, Readme, Read Me File)
11: Set MyNode = tvTreeView.Nodes.Add(A, tvwChild, eula, EULA License)
12: MyNode.EnsureVisible
13: tvTreeView.Style = tvwTreelinesText Style 4.
14: tvTreeView.BorderStyle = vbFixedSingle
15:
16: End Sub
17:
18: Private Sub tvTreeView_DblClick()
|
|
|
|
|
|